#ifndef _CHASSIS_H_
#define _CHASSIS_H_

#include "stm32f4xx_hal.h"
#define THE_X_COE     0.45f
#define THE_y_COE     0.004f
#define THE_R_COE     0.004f


typedef __packed struct
{
    int16_t forward_back_ref;
    int16_t left_right_ref;
    int16_t rotate_ref;
}ChassisSpeed_Ref_t;

typedef __packed struct
{
    int16_t Chassis_Motor_PID_Expect_1;
    int16_t Chassis_Motor_PID_Expect_2;
    int16_t Chassis_Motor_PID_Expect_3;
		int16_t Chassis_Motor_PID_Expect_4;
}Chassis_Motor_PID_Expect;

typedef __packed struct
{
    int16_t Chassis_Motor_Actual_Speed_1;
    int16_t Chassis_Motor_Actual_Speed_2;
    int16_t Chassis_Motor_Actual_Speed_3;
		int16_t Chassis_Motor_Actual_Speed_4;
}Chassis_Motor_Actual_Speed;

void PID_Expect(void);
void Chassis_Speed_Ref_Init(void);

extern ChassisSpeed_Ref_t          Chassis_Speed_Ref;

extern Chassis_Motor_PID_Expect    Chassis_Motor_PID_Ref;

extern Chassis_Motor_Actual_Speed  Chassis_Motor_Actual_Speed_ref;

extern int expect_sum;


#endif
